/**
 * Created by rain on 15-9-22.
 */

var app = angular.module('myApp' , []);
app.controller('loginCtrl',function($scope,$http){
    $scope.send = function() {
        $http({
            method : 'POST',
            url : 'http://localhost:8080/idanda/user/name',
            params:{
                'username': $scope.username
            }
        }).success(function(data) {
            if (data.failed) {
                $scope.password = data.failed;
            } else {
            $scope.password = data.password;
            }
        });
    }
});
